package com.shenyi.wx.dao;

import com.shenyi.core.globalDao.BaseDao;
import com.shenyi.wx.entity.CartDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


/**
 * @author richard.fan
 * @version 1.0
 * @date 2018/11/06
 * @desc
 * @see
 * @since 1.0
 */
@Mapper
public interface ApiCartMapper extends BaseDao<CartDO> {


    void updateCheck(@Param("productIds") String[] productIds,
                     @Param("isChecked") Integer isChecked, @Param("userId") Long userId);

    void deleteByProductIds(@Param("productIds") String[] productIds);

    void deleteByUserAndProductIds(@Param("user_id") Long user_id, @Param("productIds") String[] productIds);

    void deleteByCart(@Param("user_id") Long user_id, @Param("session_id") Integer session_id, @Param("checked") Integer checked);
}
